package com.eportal.service;

import com.eportal.domain.Sysopt;
import com.eportal.domain.Sysroles;
import com.eportal.domain.SysrolesTemplate;
import com.eportal.entity.SysrolesEntity;
import com.framework.jqgrid.JqGridPager;
import com.framework.jqgrid.PageEntity;
import com.github.pagehelper.PageInfo;

import java.util.List;
import java.util.Map;


public interface SysRolesService {

    List<Sysroles> list(JqGridPager jqGridPager, String sql);

    List<Sysroles> list(String where);

    Sysroles add(Sysroles role) throws Exception;

    void delete(Long id);

    void update(Sysroles role) throws Exception;

    void delete(List<Long> ids);

    Sysroles get(Long id);

	Sysroles getRoleByName(Sysroles role);

	void updateAllManagerRole(SysrolesTemplate entity, String mListBefore);

	Map<String, Object> addMethod(Sysroles role);

	Map<String, Object> updateMethod(Sysroles role);

	Map<String, Object> deleteMethod(String param_ids);




//todo ----------------------------------------------------------------------------

    /**
     * 角色管理列表接口
     * @author Saber
     * @Date 2017/8/18 下午5:33
     * @param pageEntity        分页对象
     * @param rname
     * @param rlevel
     * @param user              当前用户
     * @param userRole          当前用户userRole
     * @return
     */
    PageInfo<SysrolesEntity> queryForPage(PageEntity pageEntity, String rname, String rlevel, Sysopt user, int userRole);

}
